//--
app.controller('loginController', 
		['$scope', 'loginService', 'sessionService',
        function($scope, loginService, sessionService) {
	
	$scope.username = sessionService.get('username');
	$scope.userprofile = sessionService.get('userprofile');
	
	$scope.login = function() {
		loginService.login($scope);
	};
	
	$scope.logout = function() {
		loginService.logout();
	};
	
	$scope.isLogged = function() {
		return (sessionService.get('isLogged') === 'true');
	};
}]);